'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.OLE.IViewObjectEx)> _
    Public Interface IViewObjectEx
        <PreserveSig()> Function Draw(ByVal dwDrawAspect As UInteger, ByVal lindex As Integer, ByVal pvAspect As IntPtr, ByRef ptd As DVTargetDevice, ByVal hdcTargetDev As IntPtr, ByVal hdcDraw As IntPtr, ByRef lprcBounds As Rect, ByRef lprcWBounds As Rect, ByVal pfnContinue As IViewObjectDrawCallbackDelegate, ByVal dwContinue As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetColorSet(ByVal dwDrawAspect As UInteger, ByVal lindex As Integer, ByVal pvAspect As IntPtr, ByRef ptd As DVTargetDevice, ByVal hicTargetDev As IntPtr, <Out()> ByRef ppColorSet As LogPalette) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Freeze(ByVal dwDrawAspect As DVAspect, ByVal lindex As Integer, ByVal pvAspect As IntPtr, <Out()> ByRef pdwFreeze As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Unfreeze(ByVal dwFreeze As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetAdvise(ByVal aspects As DVAspect, ByVal advf As AdvF, ByRef pAdvSink As IAdviseSink) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetAdvise(<Out()> ByRef aspects As DVAspect, <Out()> ByRef advf As AdvF, <Out()> ByRef pAdvSink As IAdviseSink) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function GetExtent(ByVal dwDrawAspect As UInteger, ByVal lindex As Integer, ByRef ptd As DVTargetDevice, <Out()> ByRef lpsizel As Size) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function GetRect(ByVal dwAspect As UInteger, <Out()> ByRef pRect As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetViewStatus(<Out()> ByRef pdwStatus As ViewStatus) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function QueryHitPoint(ByVal dwAspect As UInteger, ByRef pRectBounds As Rect, ByVal ptlLoc As Point, ByVal lCloseHint As Integer, <Out()> ByRef pHitResult As HitResult) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function QueryHitRect(ByVal dwAspect As UInteger, ByRef pRectBounds As Rect, ByRef pRectLoc As Rect, ByVal lCloseHint As Integer, <Out()> ByRef pHitResult As HitResult) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetNaturalExtent(ByVal dwAspect As DVAspect, ByVal lindex As Integer, ByRef ptd As DVTargetDevice, ByVal hicTargetDev As IntPtr, ByRef pExtentInfo As DVExtentInfo, <Out()> ByRef pSizel As Size) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace
